﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Uco.Models;
using System.Diagnostics;
using System.Net.Mail;
using System.Configuration;
using System.Text;
using System.Reflection;
using System.Globalization;
using System.Web.Configuration;
using Telerik.Web.Mvc.UI;

namespace Uco.Infrastructure
{
    public static partial class SF
    {

        #region Get/Clean Repository

        public static void CleanSettingsRepository()
        {
            HttpContext.Current.Cache.Remove("Settings");
        }

        public static Uco.Models.Settings GetSettingsRepository()
        {
            if (HttpContext.Current.Cache["Settings"] == null)
            {
                HttpContext.Current.Cache["Settings"] = SF.LoadSettings();
            }
            return (Uco.Models.Settings)HttpContext.Current.Cache["Settings"];
        }

        #endregion

    }
}